package org.rednebula.framework.core.service;

import javax.servlet.http.HttpSession;

import org.jbpm.api.ExecutionService;
import org.jbpm.api.ProcessEngine;
import org.jbpm.api.TaskService;
import org.rednebula.framework.core.IEnvironment;
import org.rednebula.framework.core.utils.InternalConstant;

public class ServiceFacade {
	public static ICacheService getCacheService(IEnvironment env){
		return env.lookup(InternalConstant.DEFAULTCORECACHESERVICE);
	}
	
	public static HibernateDbService getHibernateDbService(IEnvironment env){
		return env.lookup(InternalConstant.HIBERNATEDBSERVICE);
	}
	
	public static JdbcDbService getJdbcDbService(IEnvironment env){
		return env.lookup(InternalConstant.JDBCDBSERVICE);
	}
	
	public static HttpSession getHttpSession(IEnvironment env){
		return env.lookup(InternalConstant.HTTPSESSIONCONTEXT);
	}
	
	public static ICombineService getCombineService(IEnvironment env) {
		return env.lookup(InternalConstant.DEFAULTCOMBINESERVICE);
	}
	
	public static StringIdentService getStringIdentService(IEnvironment env){
		return env.lookup(InternalConstant.STRINGIDENTSERVICE);
	}
	
	public static ProcessEngine getProcessEngine(IEnvironment env){
		return env.lookup(InternalConstant.JBPM_PROCESSENGINE_NAME);
	}
	
	public static TaskService get(IEnvironment env){
		return env.lookup(InternalConstant.TASKSERVCIE);
	}
	
	public static ExecutionService getExecutionService(IEnvironment env){
		return env.lookup(InternalConstant.EXECUTIONSERVICE);
	}
	
}
